package com.aruba.dept.controller;

import com.aruba.dept.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DeptController {

    @Autowired
    private DeptService deptService;


    @RequestMapping("dept")
    public String dept(Model model) {
        model.addAttribute("deptList", deptService.findAllDept());
        return "dept";
    }

}
